From: Jasper St. Pierre Date: Tue, 30 Sep 2014 06:22:14 +0000 (-0600) Subject: search: Reset the search display when there's no search terms X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2062 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e6cd112379cd386897108d806bc92c1ccaa59808;p=gnome-shell.git search: Reset the search display when there's no search terms Destroy the previous search view when there's no search terms, to make sure old search items don't show up. --- diff --git a/js/ui/search.js b/js/ui/search.js index 709484dae..d2ecd91aa 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -459,6 +459,17 @@ const SearchResults = new Lang.Class({ } }, + _reset: function() { + this._terms = []; + this._results = {}; + this._clearDisplay(); + this._clearSearchTimeout(); + this._defaultResult = null; + this._startingSearch = false; + + this._updateSearchProgress(); + }, + _doSearch: function() { this._startingSearch = false; @@ -493,7 +504,7 @@ const SearchResults = new Lang.Class({ this._cancellable.reset(); if (terms.length == 0) { - this._clearSearchTimeout(); + this._reset(); return; }